<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>


		<div class="bar bar-nav">
			<h1 class="title">详情</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>
		
		<nav class="bar bar-tab">
			<a class="tab-item active" href="/">
				<span class="icon icon-home"></span>
				<span class="tab-label">首页</span>
			</a>
			<a class="tab-item" href="tel:<?php echo ($data['phone_number']); ?>">
				<span class="icon iconfont icon-phone"></span>
				<span class="tab-label">咨询</span>
			</a>
			<?php if($apply_show): ?><a class="tab-item" href="<?php echo U('Index/applyUserType');?>">
				<span class="icon iconfont icon-renshu"></span>
				<span class="tab-label">我要入会</span>
			</a><?php endif; ?>
		</nav>

		<div class="content">
			<div class="content-block mechan_page_top text-center">
				<p class="item-title"><img src="<?php echo ($data['card_img']); ?>" style="width: 4rem;"></p>
				<p><?php echo ($data['full_name']); ?></p>
				<p><?php echo ($data['phone_number']); ?></p>
				<p><span><?php echo ((isset($act_count[0]) && ($act_count[0] !== ""))?($act_count[0]):"0"); ?>场活动</span>|<span><?php echo ((isset($act_count[1]) && ($act_count[1] !== ""))?($act_count[1]):"0"); ?>人参加</span></p>
				<p><?php echo (htmlspecialchars_decode($data['autograph'])); ?></p>
			</div>
			
			<div class="buttons-tab mechan-page-tab " style="margin-top:0px;">
				<a href="#tab1" class="tab-link active button">进行中的活动</a>
				<a href="#tab2" class="tab-link button">全部活动</a>
				<a href="#tab3" class="tab-link button">个人简介</a>
			</div>
			<div class="content-block row in_tab_list">
				<div class="tabs">
					<div id="tab1" class="tab in_hot_box activity_1 active">
						<div id="conduct">
						<?php if(is_array($activity)): foreach($activity as $k=>$activity): ?><div class="card demo-card-header-pic">
							<a href="<?php echo U('ActivityDetail/index', array('activity_id'=>$activity['id'],'city'=>$activity['city']));?>">
							<div valign="bottom" class="card-header color-white no-border no-padding">
								<img class='card-cover' src="<?php echo ($activity['activity_img']); ?>" alt="">
							</div>
							<div class="card-content">
								<div class="card-content-inner">
									<p class="hot_list_title"><?php echo ($activity['activity_name']); ?></p>
									<p class="color-gray"><?php echo (date("Y-m-d",$activity['start_time'])); ?> 至 <?php echo (date("Y-m-d",$activity['end_time'])); ?></p>
									<p class="color-gray"><span><?php echo ($activity['area']); ?></span><span><?php echo ($activity['signup_number']); ?>人已报名</span><span>￥<?php echo ($activity['price']); ?></span></p>
								</div>
							</div>
							</a>
						</div><?php endforeach; endif; ?>
						</div>
						<?php if($conduct_show): ?><div class="infinite-scroll-preloader" id="conduct_quan" style="display:none;">
							<div class="preloader"></div>
						 </div>
						<p onclick="ajax_conduct_submit();" class="conduct_more" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
						<?php else: ?>
						<p id="load_more"> 暂无数据！</p><?php endif; ?>
					</div>
					
					
					<div id="tab2" class="tab in_hot_box activity_1">
						<div id="all_activity">
						<?php if(is_array($all_activity)): foreach($all_activity as $k=>$all): ?><div class="card demo-card-header-pic">
							<a href="<?php echo U('ActivityDetail/index', array('activity_id'=>$all['id'],'city'=>$all['city']));?>">
							<div valign="bottom" class="card-header color-white no-border no-padding">
								<img class='card-cover' src="<?php echo ($all['activity_img']); ?>" alt="">
							</div>
							<div class="card-content">
								<div class="card-content-inner">
									<p class="hot_list_title"><?php echo ($all['activity_name']); ?></p>
									<p class="color-gray"><?php echo (date("Y-m-d",$all['start_time'])); ?> 至 <?php echo (date("Y-m-d",$all['end_time'])); ?></p>
									<p class="color-gray"><span><?php echo ($all['area']); ?></span><span><?php echo ($all['signup_number']); ?>人已报名</span><span>￥<?php echo ($all['price']); ?></span></p>
								</div>
							</div>
							</a>
						</div><?php endforeach; endif; ?>
						</div>
						<?php if($all_show): ?><div class="infinite-scroll-preloader" id="all_quan" style="display:none;">
							<div class="preloader"></div>
						 </div>
						<p onclick="ajax_all_submit();" class="all_more" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
						<?php else: ?>
						<p id="load_more"> 暂无数据！</p><?php endif; ?>
					</div>
					
					
					<div id="tab3" class="tab">
						<div class="list-block mechan_user" style="margin-top:.5rem;">
						 	<div class="card demo-card-header-pic" style="text-indent: 2rem;padding:10px 10px;">
						 		<?php echo (htmlspecialchars_decode($data['introduce'])); ?>
							</div> 
						 </div>
					</div>
				</div>
			</div>
			
		</div>
		

		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>

<script>
var  page_conduct = 1;
/*** ajax 提交表单 查询订单列表结果*/  
function ajax_conduct_submit()
{	 	 	 
	    $("#conduct_quan").show();
	    page_conduct += 1;
		$.ajax({
			type : "GET",
			//url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
			url:"/UserCompany/conductActivity/is_ajax/1/p/"+page_conduct,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
			success: function(data)
			{
				$("#conduct_quan").hide();
				if($.trim(data) == ''){
					$('.conduct_more').hide();
				}else{
				    $("#conduct").append(data);
				}
			}
		}); 
} 
var  page_all = 1;
/*** ajax 提交表单 查询订单列表结果*/  
function ajax_all_submit()
{	 	 	 
	    $("#all_quan").show();
	    page_all += 1;
		$.ajax({
			type : "GET",
			//url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
			url:"/UserCompany/allActivity/is_ajax/1/p/"+page_all,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
			success: function(data)
			{
				$("#all_quan").hide();
				if($.trim(data) == ''){
					$('.all_more').hide();
				}else{
				    $("#all_activity").append(data);
				}
			}
		}); 
} 
</script>